-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cosigned] Glob matching improvement #1842
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1842 +/- ##
==========================================
- Coverage 33.43% 33.41% -0.03%
==========================================
Files 146 146
Lines 9328 9340 +12
==========================================
+ Hits 3119 3121 +2
- Misses 5839 5845 +6
- Partials 370 374 +4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, i'd like to see some examples using gcr.io
1487f6a
to
ce39f88
Compare
Signed-off-by: Denny Hoang <dhoang@vmware.com>
ce39f88
to
757d58f
Compare
Hmm, so Windows has For the I'm thinking this is not a big concern because:
If this does not get merged today, I will have to hand off this PR to @elfotografo007 as I will not be available for a bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Signed-off-by: Denny Hoang <dhoang@vmware.com>
Summary
Instead of doing a prefix check only for glob matching, use the
filepath
implementation ofMatch
to match against glob patterns.This will also remove the restrictions for only supporting trailing wildcard
*
Alongside this change:
index.docker.io/
host if there is no host in the glob pattern and there was not a match prior.This is important since when a user deploys using
myproject/nginx
for example, the image reference gets resolved toindex.docker.io/myproject/nginx
library
repository when a glob is specified without multiple path elements.This is important since when a user deploys
busybox
for example, the image reference gets resolved toindex.docker.io/library/busybox
Now a user should be able to able to create a cluster image policy with glob patterns:
when previously they needed to prefix those as such:
Ticket Link
Fixes #1840
Related #1834
Release Note
cc: @coyote240 @elfotografo007 @hectorj2f @vaikas